﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PlaceFinder.BO;
using PlaceFinder.DAL.Common;
using PlaceFinder.DAL.Interfaces;

namespace PlaceFinder.DAL
{
    public class PlacePixelDAO:DAOBase<PlacePixel>, IPlacePixelDAO
    {
        #region IDAL<int,PlacePixel> Members

        public PlacePixel FindById(int id)
        {
            throw new NotImplementedException();
        }

        public List<PlacePixel> Find(string matchWord)
        {
            throw new NotImplementedException();
        }


        #endregion



        public List<PlacePixel> GetByPlaces(List<Place> places)
        {
            return _xmlDB.Get(pp => FindPlacePixel(places,pp.PlaceId));
        }

        private bool FindPlacePixel(List<Place> places, int placeId)
        {
            return places.Any(p => p.Id == placeId);
        }
    }
}
